#ifndef __NETCOMM_NETSERVER_H__
#define __NETCOMM_NETSERVER_H__

#include "netservice.h"
#include "netchatsession.h"

class NetServer
{
public:
    typedef boost::asio::ip::tcp::acceptor TcpAcceptor;

    NetServer(const unsigned short &a_port);
    ~NetServer();

    void start_accept();
    void handle_accept(
        NetChatSessionPtr a_session,
        const boost::system::error_code& a_error);

private:
      NetService& m_service;
      TcpAcceptor m_tcp_acceptor;
      NetChatRoom m_room;
};

#endif //__NETCOMM_NETSERVER_H__
